package o;

import android.app.Activity;
import android.os.Handler;
import android.os.Looper;
import java.lang.ref.WeakReference;

public class bdr {
    private WeakReference<Activity> ˎ;
    private bdz ॱ;

    public bdr(Activity activity, bdz o_bdz) {
        this.ˎ = new WeakReference(activity);
        this.ॱ = o_bdz;
    }

    public static void ˋ() {
        bcb.ˋ.ˋ("CommentController", "clearRealNameResult");
        fhz ˋ = fho.ˏ().ˋ("RealName");
        if (ˋ != null) {
            cut o_cut = (cut) ˋ.ॱ(cut.class);
            if (o_cut != null) {
                o_cut.ˎ();
            }
        }
    }

    public void ˎ() {
        ˎ(7);
    }

    public void ˊ() {
        ˎ(3);
    }

    private void ˎ(int i) {
        Activity activity = (Activity) this.ˎ.get();
        if (activity == null) {
            this.ॱ.ˋ();
        }
        fhz ˋ = fho.ˏ().ˋ("User");
        if (ˋ != null) {
            ((cbh) ˋ.ॱ(cbh.class)).ˎ(activity, i).ˏ(new fjq<Boolean>(this) {
                final /* synthetic */ bdr ˏ;

                {
                    this.ˏ = r1;
                }

                public void onComplete(fjo<Boolean> o_fjo_java_lang_Boolean) {
                    if (!o_fjo_java_lang_Boolean.ˊ()) {
                        this.ˏ.ॱ.ˋ();
                    } else if (((Boolean) o_fjo_java_lang_Boolean.ॱ()).booleanValue()) {
                        new Handler(Looper.getMainLooper()).post(new Runnable(this) {
                            final /* synthetic */ AnonymousClass1 ˎ;

                            {
                                this.ˎ = r1;
                            }

                            public void run() {
                                this.ˎ.ˏ.ॱ.ˊ();
                            }
                        });
                    } else {
                        this.ˏ.ॱ.ˋ();
                    }
                }
            });
        }
    }
}
